/*
 * Copyright (c) 2013 WDCY Information Technology Co. Ltd
 * www.wdcy.cc
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * WDCY Information Technology Co. Ltd ("Confidential Information").
 * You shall not disclose such Confidential Information and shall use
 * it only in accordance with the terms of the license agreement you
 * entered into with WDCY Information Technology Co. Ltd.
 */
package com.monkey.web.dto.response.user;

import com.monkey.core.domain.user.UserStatusHistory;
import com.monkey.core.web.response.MonkeyResponseDto;
import org.springframework.data.domain.Page;

import java.util.ArrayList;
import java.util.List;

/**
 * @author Wu Tianqiang
 */
public class LoadUserStatusHistoriesResponseJSONDto extends MonkeyResponseDto {

    private long totalCount;
    private List<UserStatusHistoryJSONDto> statusHistories = new ArrayList<>();

    public LoadUserStatusHistoriesResponseJSONDto(Page<UserStatusHistory> userStatusHistories) {
        this.totalCount = userStatusHistories.getTotalElements();
        this.statusHistories = UserStatusHistoryJSONDto.toJSONDto(userStatusHistories);
    }

    public long getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(long totalCount) {
        this.totalCount = totalCount;
    }

    public List<UserStatusHistoryJSONDto> getStatusHistories() {
        return statusHistories;
    }

    public void setStatusHistories(List<UserStatusHistoryJSONDto> statusHistories) {
        this.statusHistories = statusHistories;
    }
}